import request from '/@/utils/request';

export function configApi() {
    return {
        page(data:Object) {
            return request({
                url: '/system/config/page',
                method: 'get',
                params:data
            })
        },
        save(data:object) {
            return request({
                url: '/system/config/save',
                method: 'post',
                data
            })
        },
        update(data:object) {
            return request({
                url: '/system/config/update',
                method: 'post',
                data
            })
        },
        del(id:string) {
            return request({
                url: '/system/config/delete',
                method: 'post',
                data: {id:id}
            })
        },
        getValueByKey(key:number) {
            return request({
                url: '/system/config/getValueByKey',
                method: 'get',
                params:{key}
            })
        }
    }
}
